<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>dLite testing</title>
	
	<script type="text/javascript" src="dLiteCompressed.js"></script>
	<script type="text/javascript">
		DOMReady(function () {
			var apas = elmsByClass("apa", null, elm("gaka"));
			for (var i=0; i < apas.length; i++) {
				addClass(apas[i], "focused");
			};
			alert("apa");
			for (var i=0; i < apas.length; i++) {
				removeClass(apas[i], "focused");
			};
			
			addEvent(elm("apa"), "click", function (evt) {
				alert("Parent");
			});
			
			addEvent(elm("robert"), "click", function (evt) {
				alert("Hejsan");
				stopDefault(evt);
				cancelBubbling(evt);
			});
			//addEvent(document.body, "click", apa);
		});
		function apa () {
			alert("apa");
			removeEvent(document.body, "click", apa);
		}
	</script>
	<style type="text/css" media="screen">
		body {
			height: 4000px;
		}
		.focused{
			background: #c00;
		}
	</style>
</head>

<body>
	
	<div id="apa">
		<a id="robert" href="http://www.robertnyman.com/">Robert</a>
	</div>
	
	<div id="gaka">
		<div class="apa">
			APA
		</div>
		<p></p>
		<span class="apa">
			APA
		</span>
		<p></p>
	</div>
	<div class="apa">
		APA
	</div>
	
	<form action="support.html" method="GET" class="ajax-form">
		<input type="text" id="blur-test" name="Input-text" value="true">
		<input type="submit" name="Submit-button" value="true">
		<input type="submit" name="Submit-button2" value="true">
		<button type="Submit" name="Button" value="true">Send</button>
		<button type="Submit" name="Button2" value="true">Send</button>
	</form>
	
	<!-- <img src="http://www.robertnyman.com/wp-content/themes/ayers/images/logo.jpg" onload="alert('Loaded image')"> -->
	
</body>
</html>